<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>sim.addGraphStream</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simAddGraphStream" id="simAddGraphStream"></a>simAddGraphStream / sim.addGraphStream </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Adds or updates a graph stream. See also the <a href="../apiFunctions.htm#graphs">other functions related to graphs</a>.<br></td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simAddGraphStream(simInt graphHandle,const simChar* streamName,const simChar* unitStr,simInt options,const simFloat* color,simFloat cyclicRange)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>graphHandle</strong>: handle of the graph </div>
<div><strong>streamName</strong>: name of the stream</div>
<div><strong>unitStr</strong>: string describing the unit of the stream. Can be nullptr</div>
<div><strong>options</strong>: bit-coded: if bit0 is set (1), the stream is not visible. If bit1 is set (2), the label is not visible. If bit2 is set (4), the points are not linked.</div>
<div><strong>color</strong>: rgb-triplet, with values in [0.0-1.0], indicating the color of the stream. Can be nullptr</div>
<div><strong>cyclicRange</strong>: can be used with cyclic values (e.g. angles) for correct data interpretation during <a href="simSetGraphStreamTransformation.htm">stream data transformation</a>. Set to 0 if not used</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 if operation was not successful, otherwise the id of the created/updated stream<br>
</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>int streamId=sim.addGraphStream(int graphHandle,string streamName,string unitStr='',int options=0,table[3] color={1,0,0},cyclicRange=0)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div>Similar to the C-function counterpart<br>
</div>
<div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>Similar to the C-function counterpart</div></td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
